package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.MemberCardDto;
import edu.suda.xsap.entity.MemberCard;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface MemberCardConvert {

    @Mapping(source="id", target = "id")
    @Mapping(source="name", target = "name")
    @Mapping(source="description", target = "description")
    @Mapping(source="price", target = "price")
    @Mapping(source="totalCount", target = "totalCount")
    @Mapping(source="totalDay", target = "totalDay")
    @Mapping(source="status", target = "status")
    @Mapping(source="type", target = "type")
    @Mapping(source="note", target = "note")
    MemberCardDto toDto(MemberCard memberCard);

    List<MemberCardDto> toDtoList(List<MemberCard> cards);


}
